package day04;

import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.util.Arrays;
import java.util.Map;
import java.util.Scanner;
import java.util.TreeMap;

public class MapDemo {


    public static void main(String[] args) {
        Map<String, Long> contacts = new TreeMap<String, Long>();//CREATE
        contacts.put("tom", 1234567L);//INSERT
        contacts.put("jerry", 999999999999999L);
        System.out.println(contacts.get("tom"));//1234567  //SELECT
        System.out.println(contacts);
        contacts.put("tom", 98765451231L);//UPDATE
        contacts.remove("tom");//DELETE
        contacts.clear();

        //long x=123;//autocast int -> long
        //Long y=123L;//boxing  long->Long

    }
}